﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Demo.Model;


namespace Demo.IDAL
{

    #region 新闻内容操作接口:INewsService
    /// <summary>
    /// 新闻内容操作接口
    /// </summary>
    public interface INewsService
    {

        /// <summary>
        /// 根据ID，获得指定的新闻数据
        /// </summary>
        /// <param name="ID">新闻ID</param>
        /// <returns>NewsModel</returns>
        NewsModel GetNewsByID(Int32 ID);

        /// <summary>
        /// 获得所有新闻内容
        /// </summary>
        /// <returns> 新闻泛型列表</returns>
        List<NewsModel> GetAllNews();

        /// <summary>
        /// 添加一条新闻
        /// </summary>
        /// <param name="news">待添加的新闻对象</param>
        /// <returns>添加成功，返回ture；否则返回false</returns>
        bool AddNews(NewsModel news);

        /// <summary>
        /// 修改指定新闻数据
        /// </summary>
        /// <param name="news">待更新的新闻对象(包括该条新闻的ID)</param>
        /// <returns>更新成功，返回ture；否则返回false</returns>
        bool ModityNewsByID(NewsModel news);

        /// <summary>
        ///  删除某条指定的新闻
        /// </summary>
        /// <param name="ID">待删除新闻的ID</param>
        /// <returns>删除成功，返回ture；否则返回false</returns>
        bool RemoveNewsByID(Int32 ID);


    } 
    #endregion

}
